<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>自定义动画效果实现</title>
  <style>
    .div{
      width: 100px;
      height: 100px;
      background-color: rgb(27, 5, 5);
    }
  </style>
</head>
<script src="js/jquery-1.12.4.min.js"></script>
<script>
$(function(){
  $('.btn').click(function(){
    $('.div').animate(
      {
      width:200,
      marginLeft:100
    }, 1000,'linear', function () {
      alert('自定义动画执行完成!!!');
    });
  });
});
</script>
<body>
  <button class="btn">动画效果</button>
  <div class="div"></div>
</body>
</html>